Skip to content

Implement decision state machine #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 21, 2025
Merged

Conversation

timl3136
Copy link
Member

What changed?
Implemented decision state machine system for Cadence Python client including:

  • Base DecisionStateMachine class for workflow decision lifecycle tracking
  • ActivityDecisionMachine for activity task scheduling, execution, and cancellation
  • TimerDecisionMachine for timer operations
  • ChildWorkflowDecisionMachine for child workflow lifecycle management
  • DecisionManager for aggregating state machines and coordinating decisions

Also try to use proto types directly and avoid any mapping

(heavily relied on Go client state machine: https://github.com/cadence-workflow/cadence-go-client/blob/master/internal/internal_decision_state_machine.go)

Why?
Workflows need to track what decisions they've made and what state they're in. This state machine ensures decisions are made correctly, in the right order, and handles properly. It's essential for deterministic workflow execution.

How did you test it?
Local unit tests

uv test

Potential risks

Release notes

Documentation Changes

@timl3136 timl3136 merged commit 1548145 into cadence-workflow:main Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants